package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.result.MineInfoBean;
import com.common.retrofit.service.HaiNingService;

import java.util.List;

import rx.Observable;
import rx.Subscriber;

public class InfoUpdateMethods extends BaseMethods {

    private static InfoUpdateMethods m_ins = null;

    public static InfoUpdateMethods getInstance() {
        if (m_ins == null) {
            synchronized (InfoUpdateMethods.class) {
                if (m_ins == null) {
                    m_ins = new InfoUpdateMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Other/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void user_update(Subscriber<List> subscriber,
                      String uid ,String user_name,String face_id,String province_str,String city_str ,String area_str ) {
        Observable observable = initService().user_update(System.currentTimeMillis()+"",
                "178f3cf3d153c0ae4c908c8329ffd6ed",uid,user_name, face_id,province_str,city_str,area_str
        );
        toSubscribe(observable, subscriber);
    }
}
